package com.neusoft.databus.common.connection;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 只配置端口流量的拉取地址即可。查询参数，通过设备配置传递 <br />
 * Port traffic connection configuration
 *
 * @author sunchf
 */
@Getter
@Setter
@ToString
public class PorttrafficConnection extends AbstractConnection {
    private static final long serialVersionUID = 1L;

    private String url;

    @Override
    public int hashCode() {
        return (this.url).hashCode();
    }

    @Override
    public boolean equals(Object o) {
        if (o instanceof PorttrafficConnection) {
            return this.hashCode() == ((PorttrafficConnection) o).hashCode();
        }
        return false;
    }

    @Override
    public PorttrafficConnection asUsedConnection() {
        return this;
    }
}
